﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using System.Data;

/// <summary>
/// Summary description for RegisterManager
/// </summary>
public class RegisterManager
{
	public RegisterManager()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public static bool AddNewManager(Manager man)
    {
        bool check;
        string sql = String.Format("INSERT INTO Manager VALUES('{0}','{1}','{2}','{3}','{4}','{5}')",man.Username,man.Password,man.Email,man.Fullname,man.Mobile,man.Address);

        ConnectDAL conDal = new ConnectDAL();
        check = conDal.ExecuteQuery(sql);

        return check;
    }

    public static DataTable DisplayManager()
    {
        DataTable tblData = new DataTable();

        string sql = String.Format("SELECT Username,FullName,Email,Mobile,Address From Manager");
        ConnectDAL conDal = new ConnectDAL();

        tblData = conDal.getData(sql);

        return tblData;
    }

}